package org.example.base.thlocal;

public class ThreadLocalTest {

    public static void main(String[] args) {


        DataContext dataContext = new DataContext();

        new Thread(() -> {
            dataContext.set(Thread.currentThread().getName());
            System.out.println(dataContext.get());
        }).start();

        new Thread(() -> {
            dataContext.set(Thread.currentThread().getName());
            System.out.println(dataContext.get());


        }).start();

    }
}
